POV-Ray : Newsgroups : povray.tools.poser : Future implementations of Poseray. A wish list : Re: Future implementations of Poseray. Place of uv_mapping code Server Time
27 Apr 2024 15:19:07 EDT (-0400)
  Re: Future implementations of Poseray. Place of uv_mapping code  
From: FlyerX
Date: 12 Nov 2009 15:34:38
Message: <4afc715e@news.povray.org>
I put the uv_mapping inside the pigment and normal for more control. As 
shown in the POV-Ray manual it can inside or outside of these 
statements. I did not notice a problem because I have not used textures 
with alpha channels in a very long time. Automatically putting 
uv_mapping outside the pigment and normal should not be a problem. 
Thanks for the suggestions.

The material structure has changed significantly in format in the latest 
PoseRay because it now supports specular and transparency mapping at the 
same time. Also I dropped the use of the predefined Clear pigment with 
transparency mapping since I was having problems with it. I replaced it 
by color rgbft<0,0,0,1,1>. I do not remember exactly the reason (I will 
have to review my notes) but I believe the transparency at the edges was 
not working well with Clear.

I will try to release a preliminary version of PoseRay this week since 
it has some of the many changes that were suggested in this forum plus 
other fixes.

Below are samples of the new PoseRay-generated materials. They have the 
transformation at the end of each map. If any of you see anything wrong 
with them please let me know (besides the uv_mapping issue). Most likely 
I will have to define the textures before plugging them into the 
texture_map entries so that uv_mapping could be placed outside the pigment.

pigment only:
http://mysite.verizon.net/sfg0000/files/p.txt

pigment only but multiplied by a color:
http://mysite.verizon.net/sfg0000/files/p_m.txt

pigment+transparency:
http://mysite.verizon.net/sfg0000/files/p_t.txt

pigment+finish+normal+transparency:
http://mysite.verizon.net/sfg0000/files/p_n_f_t.txt

pigment+finish+normal:
http://mysite.verizon.net/sfg0000/files/p_n_f.txt

pigment+normal:
http://mysite.verizon.net/sfg0000/files/p_n.txt

FlyerX

Ive wrote:
> Thomas de Groot wrote:
>> When using a transparency map instead of using the alpha channel, the 
>> code in Poseray should then also be as follows (note the place of 
>> uv_mapping) e.g.:
>>
>> //Material definitions
>> #declare MyTexTex__opaque=
>> texture {
>>   uv_mapping
>>   pigment { p_map1}
>>   normal {MyNormal}
>>   finish {MyFinish}
>> }
>> #declare MyTexTex_=
>> material {
>>   texture {
>>     uv_mapping
>>     pigment_pattern { p_map2}
>>     texture_map {
>>       [0 MyTex__opaque]
>>       [1 pigment {Clear}]
>>     }
>>   }
>> }
> 
> As a side note, usually I do use a construct like this:
> 
> #local MyTexTex_opaque =
>  texture {
>    uv_mapping
>    pigment { p_map1}
>    normal {MyNormal}
>    finish {MyFinish}
>  }
> 
> #local MyTexTex_trans =
>  texture {
>    uv_mapping
>    pigment { p_map1 transmit 1}
>    normal {MyNormal}
>    finish {MyFinishButWithoutAnySpecularPhongAndReflection}
>  }
> 
>  #declare MyTexTex_=
>  material {
>    texture {
>      uv_mapping
>      pigment_pattern { p_map2}
>      texture_map {
>        [0 MyTex_opaque]
>        [1 MyTex_trans]
>      }
>    }
>  }
> 
> 
> This does not make *much* of a difference but occasionally for closeup 
> shots and things like lace pattern or trans-mapped hair it looks better.
> 
> -Ive


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.